<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: gdsl_2darray.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('gdsl__2darray_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">gdsl_2darray.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="gdsl__2darray_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * This file is part of the Generic Data Structures Library (GDSL).</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2006 Nicolas Darnis &lt;ndarnis@free.fr&gt;.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * The GDSL library is free software; you can redistribute it and/or </span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU General Public License as </span>
<a name="l00007"></a>00007 <span class="comment"> * published by the Free Software Foundation; either version 2 of</span>
<a name="l00008"></a>00008 <span class="comment"> * the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * The GDSL library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment"> * along with the GDSL library; see the file COPYING.</span>
<a name="l00017"></a>00017 <span class="comment"> * If not, write to the Free Software Foundation, Inc., </span>
<a name="l00018"></a>00018 <span class="comment"> * 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * $RCSfile: gdsl__2darray_8h_source.html,v $</span>
<a name="l00021"></a>00021 <span class="comment"> * $Revision: 1.3 $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2013/06/12 16:36:13 $</span>
<a name="l00023"></a>00023 <span class="comment"> */</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef _GDSL_2DARRAY_H_</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define _GDSL_2DARRAY_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="gdsl__types_8h.html">gdsl_types.h</a>&quot;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> 
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 
<a name="l00053"></a><a class="code" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">00053</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>gdsl_2darray* <a class="code" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8" title="GDSL 2D-array type.">gdsl_2darray_t</a>;
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="comment">/******************************************************************************/</span>
<a name="l00056"></a>00056 <span class="comment">/* Management functions of 2D-arrays                                          */</span>
<a name="l00057"></a>00057 <span class="comment">/******************************************************************************/</span>
<a name="l00058"></a>00058 
<a name="l00083"></a>00083 <span class="keyword">extern</span> gdsl_2darray_t
<a name="l00084"></a>00084 <a class="code" href="group__gdsl__2darray.html#ga0bb00b11d1705236a70c4787670ee2c3" title="Create a new 2D-array.">gdsl_2darray_alloc</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* NAME,
<a name="l00085"></a>00085             <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> R,
<a name="l00086"></a>00086             <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> C,
<a name="l00087"></a>00087             <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f" title="GDSL Alloc element function type.">gdsl_alloc_func_t</a> ALLOC_F,
<a name="l00088"></a>00088             <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053" title="GDSL Free element function type.">gdsl_free_func_t</a> FREE_F
<a name="l00089"></a>00089             );
<a name="l00090"></a>00090 
<a name="l00106"></a>00106 <span class="keyword">extern</span> <span class="keywordtype">void</span> 
<a name="l00107"></a>00107 <a class="code" href="group__gdsl__2darray.html#gadd88f34b133a6b49e257567a57fbff0b" title="Destroy a 2D-array.">gdsl_2darray_free</a> (gdsl_2darray_t A
<a name="l00108"></a>00108            );
<a name="l00109"></a>00109 
<a name="l00110"></a>00110 <span class="comment">/******************************************************************************/</span>
<a name="l00111"></a>00111 <span class="comment">/* Consultation functions of 2D-arrays                                        */</span>
<a name="l00112"></a>00112 <span class="comment">/******************************************************************************/</span>
<a name="l00113"></a>00113 
<a name="l00123"></a>00123 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>*
<a name="l00124"></a>00124 <a class="code" href="group__gdsl__2darray.html#ga43fecb137d5a152c8bd1310b93e14401" title="Get the name of a 2D-array.">gdsl_2darray_get_name</a> (<span class="keyword">const</span> gdsl_2darray_t A
<a name="l00125"></a>00125                );
<a name="l00126"></a>00126 
<a name="l00136"></a>00136 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>
<a name="l00137"></a>00137 <a class="code" href="group__gdsl__2darray.html#ga26492a4c0714888029b1691994a33998" title="Get the number of rows of a 2D-array.">gdsl_2darray_get_rows_number</a> (<span class="keyword">const</span> gdsl_2darray_t A
<a name="l00138"></a>00138                   );
<a name="l00139"></a>00139 
<a name="l00149"></a>00149 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>
<a name="l00150"></a>00150 <a class="code" href="group__gdsl__2darray.html#gad5f3ca5120e902ed23204bd52440d463" title="Get the number of columns of a 2D-array.">gdsl_2darray_get_columns_number</a> (<span class="keyword">const</span> gdsl_2darray_t A
<a name="l00151"></a>00151                  );
<a name="l00152"></a>00152 
<a name="l00162"></a>00162 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>
<a name="l00163"></a>00163 <a class="code" href="group__gdsl__2darray.html#gaee2aa4a8f7112592ee19f3387d543b25" title="Get the size of a 2D-array.">gdsl_2darray_get_size</a> (<span class="keyword">const</span> gdsl_2darray_t A
<a name="l00164"></a>00164                );
<a name="l00165"></a>00165 
<a name="l00178"></a>00178 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00179"></a>00179 <a class="code" href="group__gdsl__2darray.html#ga0aadae9c7329a7d0bf15867b7c344f5d" title="Get an element from a 2D-array.">gdsl_2darray_get_content</a> (<span class="keyword">const</span> gdsl_2darray_t A,
<a name="l00180"></a>00180               <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> R,
<a name="l00181"></a>00181               <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> C
<a name="l00182"></a>00182               );
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 <span class="comment">/******************************************************************************/</span>
<a name="l00185"></a>00185 <span class="comment">/* Modification functions of 2D-arrays                                        */</span>
<a name="l00186"></a>00186 <span class="comment">/******************************************************************************/</span>
<a name="l00187"></a>00187 
<a name="l00201"></a>00201 <span class="keyword">extern</span> gdsl_2darray_t
<a name="l00202"></a>00202 <a class="code" href="group__gdsl__2darray.html#ga6fb07f6368cc60fa9a05e86338fa3e1d" title="Set the name of a 2D-array.">gdsl_2darray_set_name</a> (gdsl_2darray_t A,
<a name="l00203"></a>00203                <span class="keyword">const</span> <span class="keywordtype">char</span>* NEW_NAME
<a name="l00204"></a>00204                );
<a name="l00205"></a>00205 
<a name="l00227"></a>00227 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00228"></a>00228 <a class="code" href="group__gdsl__2darray.html#ga0fa94bb086b0e0a7089ec88c2998ce27" title="Modify an element in a 2D-array.">gdsl_2darray_set_content</a> (gdsl_2darray_t A,
<a name="l00229"></a>00229               <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> R,
<a name="l00230"></a>00230               <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> C,
<a name="l00231"></a>00231               <span class="keywordtype">void</span>* VALUE
<a name="l00232"></a>00232               );
<a name="l00233"></a>00233 
<a name="l00234"></a>00234 <span class="comment">/******************************************************************************/</span>
<a name="l00235"></a>00235 <span class="comment">/* Input/output functions of 2D-arrays                                        */</span>
<a name="l00236"></a>00236 <span class="comment">/******************************************************************************/</span>
<a name="l00237"></a>00237 
<a name="l00254"></a>00254 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00255"></a>00255 <a class="code" href="group__gdsl__2darray.html#gaf3f55d704d6d4323c078c828441a155e" title="Write the content of a 2D-array to a file.">gdsl_2darray_write</a> (<span class="keyword">const</span> gdsl_2darray_t A,
<a name="l00256"></a>00256             <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6" title="GDSL Write element function type.">gdsl_write_func_t</a> WRITE_F,
<a name="l00257"></a>00257             FILE* OUTPUT_FILE,
<a name="l00258"></a>00258             <span class="keywordtype">void</span>* USER_DATA
<a name="l00259"></a>00259             );
<a name="l00260"></a>00260 
<a name="l00278"></a>00278 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00279"></a>00279 <a class="code" href="group__gdsl__2darray.html#gac21cb1bc98ae0c4183cba13bb78d5f5b" title="Write the content of a 2D array to a file into XML.">gdsl_2darray_write_xml</a> (<span class="keyword">const</span> gdsl_2darray_t A,
<a name="l00280"></a>00280             <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6" title="GDSL Write element function type.">gdsl_write_func_t</a> WRITE_F,
<a name="l00281"></a>00281             FILE* OUTPUT_FILE,
<a name="l00282"></a>00282             <span class="keywordtype">void</span>* USER_DATA
<a name="l00283"></a>00283             );
<a name="l00284"></a>00284 
<a name="l00302"></a>00302 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00303"></a>00303 <a class="code" href="group__gdsl__2darray.html#gaf66c650d8d7fd36021dcec21c6186aa1" title="Dump the internal structure of a 2D array to a file.">gdsl_2darray_dump</a> (<span class="keyword">const</span> gdsl_2darray_t A,
<a name="l00304"></a>00304            <span class="keyword">const</span> <a class="code" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6" title="GDSL Write element function type.">gdsl_write_func_t</a> WRITE_F,
<a name="l00305"></a>00305            FILE* OUTPUT_FILE,
<a name="l00306"></a>00306            <span class="keywordtype">void</span>* USER_DATA
<a name="l00307"></a>00307            );
<a name="l00308"></a>00308 
<a name="l00309"></a>00309 <span class="comment">/*</span>
<a name="l00310"></a>00310 <span class="comment"> * @}</span>
<a name="l00311"></a>00311 <span class="comment"> */</span>
<a name="l00312"></a>00312 
<a name="l00313"></a>00313 
<a name="l00314"></a>00314 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00315"></a>00315 <span class="preprocessor"></span>}
<a name="l00316"></a>00316 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00317"></a>00317 
<a name="l00318"></a>00318 
<a name="l00319"></a>00319 <span class="preprocessor">#endif </span><span class="comment">/* _GDSL_2DARRAY_H_ */</span>
<a name="l00320"></a>00320 
<a name="l00321"></a>00321 
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="gdsl__2darray_8h.html">gdsl_2darray.h</a>      </li>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
